package com.job.ming;

/**
 * @author yangmingyu
 * @version 1.0
 * @since 2022-07-02 17:00:58
 */
public class Mytool {
    public static void xuanze(int[] r){
        for (int t=0;t<r.length-1;t++){
            for (int i=t+1;i<r.length;i++){
                if (r[t]<r[i]){
                    int temp=r[i];
                    r[i]=r[t];
                    r[t]=temp;
                }
            }
        }
        for (int i:r){
            System.out.print(i+",");
        }
    }


   public static void maopao(int[] a){
       for(int t = 0;
           t<a.length-1;t++)
       {
           for (int i = 0; i < a.length - 1 - t; i++)
       {
               if (a[i] < a[i + 1]) {
                   int temp = a[i];
                   a[i] = a[i + 1];
                   a[i + 1] = temp;
               }
           }
       }
       for(int i:a)
       {
           System.out.print(i + ",");
       }
   }
}